Dynomotion

Group: DynoMotion Message: 14241 From: engnerdan Date: 12/7/2016
Subject: ExternalButtons.c - Panic proof Feedhold
Something that has bothered me for a while was the way the feedhold worked in the example program. If I hit the feedhold switch and the my mill didn't stop motion instantly I was inclined to hit the button a second time. Which could be disaster if the KFLOP was actually in the process of stopping. The original code would resume from a feedhold with a second press of the feedhold switch.

Even thought the change is very easy I thought I would share the modified code.

I am sharing these two versions of updated ExternalButtons.c code. In both copies of the code the the feedhold switch will only initiate a feedhold, the cycle start switch is needed to resume from a feedhold. This is also the way industrial CNC machines work. I have included two versions, one being a stripped down minimalist example like the original code and the second adding in a few things that typically need to be stopped in the case of an E-Stop condition or a Halt condition.

-Dan


  @@attachment@@
Group: DynoMotion Message: 14243 From: mmurray70@hotmail.com Date: 12/7/2016
Subject: Re: ExternalButtons.c - Panic proof Feedhold
I agree, 100%. You cant use a button meant to stop the machine to also restart the machine. Thats just asking for trouble. I didnt bother with this sample code at all and was using something similar to yours at first. 

The last bit of code i posted is a little confusing, but basically it just uses the feedhold button to set a variable, and then you check for this variable and whatever other conditions you want, and then actually issue the stopcoordinatedmotion command. 

In my case i checked for my feedhold variable, waited until any axis was instructed to move, my toolchanger was finished, and a job is active, all the same time. This way it remembers if feedhold is pushed while toolchanging for example, and it applies feedhold as soon as toolchange is done and machine is instructed to move. Seems to be working well so far. 

mark